<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>mvvm</title>
  <script src="lib/Observer.js"></script>
  <script src="lib/Watch.js"></script>
  <script src="lib/Compile.js"></script>
  <script src="lib/index.js"></script>
</head>
<body>
    <div id="app">
        <h2>{{title}}</h2>
        <input type="text" v-model="name">
        <h1>{{name}}</h1>
        <button v-on:click="clickHandle">click me !改变title</button>
    </div>
    <script>
        const vm = new VUE({
          el: '#app',
          data: {
            name: 'hello',
            title: 'vue'
          },
          mounted() {
            setTimeout(() => {
              this.data.title = '等了1s了'
              // console.log(this.name)
            }, 1000)
          },
          methods: {
            clickHandle() {
              this.data.title = '改变title点我呀!'
            }
          }
        })
    </script>
</body>
</html>
